<template>
  <div class="about">
    <v-header />
    <v-sidebar />
    <div :class="isCollapse ? 'el-tagnavigation-no' : 'el-tagnavigation'">
      <!-- <v-tags></v-tags> -->
      <div class="content">
        <router-view v-slot="{ Component }">
          <transition name="move" mode="out-in">
            <keep-alive :include="tagsList">
              <component :is="Component" />
            </keep-alive>
          </transition>
        </router-view>
      </div>
    </div>
  </div>
</template>

<script>
import vHeader from "../components/Header.vue";
import vSidebar from "../components/Sidebar.vue";
import vTags from "../components/Tags.vue";
export default {
  computed: {
    isCollapse() {
      // 这里的数据就是从vuex取得
      return this.$store.state.tab.isCollapse;
    }
  },
  components: {
    vHeader,
    vSidebar,
    vTags
  }
};
</script>

<style scoped>
/* 修改部分：添加媒体查询，适配手机端 */
@media (max-width: 768px) {
  .el-tagnavigation {
    left: 0;
  }
  .el-tagnavigation-no {
    left: 0;
  }
}
.el-tagnavigation {
  position: absolute;
  border-top: 1px solid #f4f4f4;
  background-color: #fff;
  color: #fff;
  text-align: left;
  line-height: 40px;
  top: 50px;
  left: 250px;
  right: 0px;
  height: 40px;
}
.el-tagnavigation-no {
  position: absolute;
  border-top: 1px solid #f4f4f4;
  background-color: #fff;
  color: #fff;
  text-align: left;
  line-height: 40px;
  top: 50px;
  left: 64px;
  right: 0px;
  height: 40px;
}
.content {
  background-color: #fffdf4;
  width: 100%;
  /* height: 90vh; */
  overflow: auto; /* 添加溢出滚动条 */
  overflow-x: hidden; /* 隐藏横向滚动条 */
}
</style>
